/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.business.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import me.zhengjie.base.BaseBusiness;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author xiahongbo
* @date 2022-08-17
**/
@Entity
@Data
@Table(name="BIS_FYMX")
public class Fymx extends BaseBusiness implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "FymxSeqGenerator")
    @SequenceGenerator(name = "FymxSeqGenerator", sequenceName = " SEQUENCE_FYMX", allocationSize = 1)
    @Column(name = "BIS_FYMX_ID")
    @ApiModelProperty(value = "费用明细主键")
    private Long bisFymxId;

    @Column(name = "BIS_FYMX_JZDJ_ID")
    @ApiModelProperty(value = "就诊登记ID")
    private Long bisFymxJzdjId;

    @Column(name = "BIS_FYMX_JZDJ_LSH")
    @ApiModelProperty(value = "就诊流水号")
    private String bisFymxJzdjLsh;

    @Column(name = "BIS_FYMX_YBKH")
    @ApiModelProperty(value = "医保卡号")
    private String bisFymxYbkh;

    @Column(name = "BIS_FYMX_YJLX")
    @ApiModelProperty(value = "交易类型（1收费，-1退费）")
    private String bisFymxYjlx;

    @Column(name = "BIS_FYMX_YYYPBM")
    @ApiModelProperty(value = "医院药品编码")
    private String bisFymxYyypbm;

    @Column(name = "BIS_FYMX_CFH")
    @ApiModelProperty(value = "处方号")
    private String bisFymxCfh;

    @Column(name = "BIS_FYMX_KFRQ")
    @ApiModelProperty(value = "开方日期")
    private String bisFymxKfrq;

    @Column(name = "BIS_FYMX_YBYPBM")
    @ApiModelProperty(value = "医保中心编码")
    private String bisFymxYbypbm;

    @Column(name = "BIS_FYMX_MC")
    @ApiModelProperty(value = "项目名称")
    private String bisFymxMc;

    @Column(name = "BIS_FYMX_DJ")
    @ApiModelProperty(value = "单价")
    private BigDecimal bisFymxDj;

    @Column(name = "BIS_FYMX_SL")
    @ApiModelProperty(value = "数量")
    private Long bisFymxSl;

    @Column(name = "BIS_FYMX_ZJ")
    @ApiModelProperty(value = "总价（单价*数量 退费时仍为正值）")
    private BigDecimal bisFymxZj;

    @Column(name = "BIS_FYMX_JX")
    @ApiModelProperty(value = "剂型")
    private String bisFymxJx;

    @Column(name = "BIS_FYMX_JL")
    @ApiModelProperty(value = "剂量")
    private BigDecimal bisFymxJl;

    @Column(name = "BIS_FYMX_SYPC")
    @ApiModelProperty(value = "使用频次")
    private String bisFymxSypc;

    @Column(name = "BIS_FYMX_YF")
    @ApiModelProperty(value = "用法")
    private String bisFymxYf;

    @Column(name = "BIS_FYMX_ZXKS")
    @ApiModelProperty(value = "执行科室")
    private String bisFymxZxks;

    @Column(name = "BIS_FYMX_ZXTS")
    @ApiModelProperty(value = "执行天数")
    private Long bisFymxZxts;

    @Column(name = "BIS_FYMX_YBSFLB")
    @ApiModelProperty(value = "医保收费类别")
    private String bisFymxYbsflb;

    @Column(name = "BIS_FYMX_SPR")
    @ApiModelProperty(value = "审批人")
    private String bisFymxSpr;

    @Column(name = "BIS_FYMX_ZDXMJKM")
    @ApiModelProperty(value = "重点项目监控码")
    private String bisFymxZdxmjkm;

    @Column(name = "BIS_FYMX_YSXM")
    @ApiModelProperty(value = "医生姓名")
    private String bisFymxYsxm;

    @Column(name = "BIS_FYMX_JBR")
    @ApiModelProperty(value = "经办人")
    private String bisFymxJbr;

    @Column(name = "BIS_FYMX_YYSFLB")
    @ApiModelProperty(value = "医院收费类别")
    private String bisFymxYysflb;

    @Column(name = "BIS_FYMX_DW")
    @ApiModelProperty(value = "单位")
    private String bisFymxDw;

    @Column(name = "BIS_FYMX_GG")
    @ApiModelProperty(value = "规格")
    private String bisFymxGg;

    @Column(name = "BIS_FYMX_CFYBZ")
    @ApiModelProperty(value = "处方药标志（1处方药 0非处方药）")
    private String bisFymxCfybz;

    @Column(name = "BIS_FYMX_BZSL")
    @ApiModelProperty(value = "包装数量")
    private Long bisFymxBzsl;

    @Column(name = "BIS_FYMX_YL")
    @ApiModelProperty(value = "每次用量")
    private BigDecimal bisFymxYl;

    @Column(name = "BIS_FYMX_YPDZJGM")
    @ApiModelProperty(value = "中国药品电子监管码")
    private String bisFymxYpdzjgm;

    @Column(name = "BIS_FYMX_GRBH")
    @ApiModelProperty(value = "医保个人编号")
    private String bisFymxGrbh;

    @Column(name = "BIS_FYMX_SFSC")
    @ApiModelProperty(value = "是否上传")
    private String bisFymxSfsc;



    public void copy(Fymx source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}